package day7;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Arr10 {
    public static void main(String[] args) {
        System.out.println("输入5家店价格");
        Scanner sc = new Scanner(System.in);
        int arry[] = new int[5];
        //int min = arry[0];min值就是0，后面数组变了，不会变
        for (int i = 0; i < arry.length; i++) {
            System.out.println("请输入第" + (i + 1) + "家店的价格");
            arry[i] = sc.nextInt();
        }
        int min = arry[0];
        for (int i = 0; i < arry.length; i++) {
            if (min > arry[i]) {
                min = arry[i];
            }
        }
        System.out.println("最低价："+min);

    }
}
